<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<table width="101%" border="1" class="celdatodo">
  <br />
  <br />
  <br />
  <br />
  <br />
  <br />
  <br />
  <br />
  <br />
  <br />
  <? $resu=mysql_query("SELECT * FROM  id_compra WHERE cod_c='$registro[0]'",$conexion);

	while ($reg= mysql_fetch_row($resu)) { 	?>
  <? $subtotal=$subtotal+$totaluni; } ?>
  <? 
  
  
  $re=mysql_query("SELECT sum(cantidad*pre_unit),iva FROM  id_compra WHERE cod_c='$registro[0]' and iva!='0' group by iva",$conexion);

	while ($iva= mysql_fetch_row($re)) { 
	
	?>
  <? $totaliva1=$totaliva1+$totaliva; 
  $totaliva2= number_format($totaliva1,2,",",".");
  } ?>
  <tr>
    <td height="28" class="celdatodo" ><div align="center">Elaborado Por: </div></td>
    <td class="celdatodo"><div align="center">Aprobado Por: </div></td>
    <td colspan="2" class="celdatodo" ><div align="center">Recibido Por: </div></td>
  </tr>
  <tr>
    <td colspan="4" class="celdatodo" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" class="celdatodo" ><div align="center"></div>
        <div align="center"></div>
      <div align="center"></div></td>
  </tr>
  <tr>
    <td class="celdatodo" ><div align="center"><? echo "$registro[6]";?></div></td>
    <td class="celdatodo" ><div align="center"><? echo "$registro[7]";?></div></td>
    <td colspan="2" class="celdatodo"><div align="center">&nbsp;</div></td>
  </tr>
  <tr>
    <td class="celdatodo"><div align="center">Administradora de la Unidad </div></td>
    <td class="celdatodo"><div align="center">Jefe de la Unidad </div></td>
    <td colspan="2" class="celdatodo"><div align="justify">
        <div align="center">Firma y Sello </div></td>
  </tr>
</table>
</body>
</html>
